package com.hbxs.folder.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 自定义异常生成类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CustomGenericException extends RuntimeException {

    //错误码
    private Integer code;
    //错误信息
    private String msg;


    //自定义错误信息类生成方法
    public static CustomGenericException generate(Integer code, String msg) {
        return new CustomGenericException(code,msg);
    }
}
